declare module "uss" {
  namespace Types {
    namespace Xhr {
      interface Details extends CM_Types.Xhr.Details {
        data?: string;
        responseType?: XMLHttpRequestResponseType;
        url: string;
        onabort?: (e: Response) => void;
        onerror?: (e: Response) => void;
        onload?: (e: Response) => void;
        onloadend?: (e: Response) => void;
        onloadstart?: (e: Response) => void;
        onprogress?: (e: Response) => void;
        onreadystatechange?: (e: Response) => void;
        ontimeout?: (e: Response) => void;
      }
      interface Response {
        readonly readyState?:
          | typeof XMLHttpRequest.UNSENT
          | typeof XMLHttpRequest.OPENED
          | typeof XMLHttpRequest.HEADERS_RECEIVED
          | typeof XMLHttpRequest.LOADING
          | typeof XMLHttpRequest.DONE;
        readonly response?: typeof XMLHttpRequest.prototype.response;
        readonly responseHeaders?: ReturnType<
          typeof XMLHttpRequest.prototype.getAllResponseHeaders
        >;
        readonly responseText?: typeof XMLHttpRequest.prototype.responseText;
        readonly responseType?: XMLHttpRequestResponseType;
        readonly responseURL?: typeof XMLHttpRequest.prototype.responseURL;
        readonly status?: typeof XMLHttpRequest.prototype.status;
        readonly statusText?: typeof XMLHttpRequest.prototype.statusText;
        readonly timeout?: number;
        readonly withCredentials?: boolean;
      }
    }
  }
}
